#!/bin/bash

set -e
set -x

# for i in `ls /usr/lib/modules/5.10.0-*.x86_64/kernel/net/netfilter/ipvs`
# do 
#     k=`echo $i | awk -F. '{print $1}'`
#     modprobe $k;
# done
bypy download ipvsadm-1.31-6.oe2203sp4.x86_64.rpm
yum -y --disablerepo='*' localinstall ipvsadm-1.31-6.oe2203sp4.x86_64.rpm.rpm
cat > /etc/sysctl.d/ipvs.conf <<EOF
net.ipv4.ip_forward = 1
EOF
sysctl -p /etc/sysctl.d/ipvs.conf

set +x
set +e